/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background: #f5f7fa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 全局过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-fade-enter-active,
.slide-fade-leave-active {
  transition: all 0.3s ease;
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(10px);
  opacity: 0;
}

/* Element Plus 样式覆盖 */
.el-message {
  min-width: 300px;
}

.el-message--success {
  --el-message-bg-color: #f6ffed;
  --el-message-border-color: #b7eb8f;
  --el-message-text-color: #52c41a;
}

.el-message--warning {
  --el-message-bg-color: #fffbe6;
  --el-message-border-color: #ffe58f;
  --el-message-text-color: #faad14;
}

.el-message--error {
  --el-message-bg-color: #fff2f0;
  --el-message-border-color: #ffccc7;
  --el-message-text-color: #ff4d4f;
}

.el-button {
  border-radius: 4px;
}

.el-input__wrapper,
.el-textarea__wrapper {
  border-radius: 4px !important;
}

.el-dialog {
  border-radius: 8px;
}

.el-dialog__header {
  margin-right: 0;
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 24px;
}

.el-dialog__body {
  padding: 24px;
}

.el-dialog__footer {
  border-top: 1px solid #f0f0f0;
  padding: 16px 24px;
}

/* 通用样式类 */
.text-primary {
  color: #1890ff;
}

.text-success {
  color: #52c41a;
}

.text-warning {
  color: #faad14;
}

.text-danger {
  color: #ff4d4f;
}

.text-muted {
  color: #999;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: 500;
}

.cursor-pointer {
  cursor: pointer;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-lg {
  gap: 24px;
}

.mt-sm {
  margin-top: 8px;
}

.mt-md {
  margin-top: 16px;
}

.mt-lg {
  margin-top: 24px;
}

.mb-sm {
  margin-bottom: 8px;
}

.mb-md {
  margin-bottom: 16px;
}

.mb-lg {
  margin-bottom: 24px;
}

.ml-sm {
  margin-left: 8px;
}

.ml-md {
  margin-left: 16px;
}

.ml-lg {
  margin-left: 24px;
}

.mr-sm {
  margin-right: 8px;
}

.mr-md {
  margin-right: 16px;
}

.mr-lg {
  margin-right: 24px;
}

/* 添加订单通知样式 */
@keyframes notify-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(230, 81, 81, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(230, 81, 81, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(230, 81, 81, 0);
  }
}

.el-notification.order-notification-popup {
  padding: 15px;
  border-left: 4px solid #f56c6c;
}

.el-notification.order-notification-popup .el-notification__title {
  color: #f56c6c;
  font-weight: bold;
}

.el-notification.order-notification-popup.unread {
  animation: notify-pulse 2s infinite;
}

/* 通用样式调整 */
.el-main {
  padding: 20px;
}

.page-container {
  background-color: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ebeef5;
}

.page-title {
  font-size: 20px;
  font-weight: bold;
  color: #303133;
}

.page-tools {
  display: flex;
  gap: 10px;
}

.status-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
}

.status-tag-primary {
  background-color: #ecf5ff;
  color: #409eff;
  border: 1px solid #d9ecff;
}

.status-tag-success {
  background-color: #f0f9eb;
  color: #67c23a;
  border: 1px solid #e1f3d8;
}

.status-tag-warning {
  background-color: #fdf6ec;
  color: #e6a23c;
  border: 1px solid #faecd8;
}

.status-tag-danger {
  background-color: #fef0f0;
  color: #f56c6c;
  border: 1px solid #fde2e2;
}

.status-tag-info {
  background-color: #f4f4f5;
  color: #909399;
  border: 1px solid #e9e9eb;
}

/* 修复图片预览被表格固定列遮挡的问题 */
.el-image-viewer__wrapper {
  z-index: 10000 !important;
}

.el-image-viewer__mask {
  z-index: 9999 !important;
}

/* 确保图片预览在最顶层 */
.el-overlay {
  z-index: 9999 !important;
}

/* 确保表格固定列不会遮挡其他元素 */
.el-table__fixed,
.el-table__fixed-right {
  z-index: auto !important;
}

/* 修复图片预览时的点击问题 */
.el-image-viewer__canvas {
  z-index: 10001 !important;
} 